package com.bigdata.management.service;

import com.bigdata.management.bean.Customer;
import com.bigdata.management.mapper.CustomerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CustomerServiceIml implements CustomerService{

    @Autowired
    CustomerMapper customerMapper;
    @Override
    public Customer getCustomerByName(String name) {
        Customer customer = new Customer();
        customer.setName("aaa");
        customer.setAge(333);
        return customer;
    }

    @Override
    public List<Customer> getAllCustomer() {
        return customerMapper.getCustomer();
    }

    @Override
    public void insertCustomer(Customer customer) {
        customerMapper.insertCustomer(customer);
    }

    @Override
    public void updateCustomer(Customer customer) {
        customerMapper.updateCustomer(customer);
    }
}
